package com.lijian.dubbo.consumer.action;

import org.springframework.stereotype.Component;

import com.alibaba.dubbo.config.annotation.Reference;
import com.lijian.dubbo.beans.User;
import com.lijian.dubbo.service.HelloService;
import com.lijian.dubbo.service.SlowService;
import com.lijian.dubbo.service.ValidateService;

@Component
public class UserAction {

	@Reference
	HelloService helloService;
	@Reference(timeout=1000)
	SlowService slowService;
	@Reference
	ValidateService validateService;
	
	public String say(String a){
		return helloService.hello(a);
	}
	
	public String testSlow(){
		return slowService.slow();
	}
	
	public String addUser(User user){
		return validateService.insert(user);
	}
}
